s1 = set(range(10, 50, 10))
s2 = set(range(20, 70, 20))
print('s1', s1)
print('s2', s2)
# 交集
print(s1.intersection(s2))

# 并集
print(s1.union(s2))
print(s1 | s2)  # | 与 并集 等价

# 差集
print(s1.difference(s2))
print(s1 - s2)

# 对称差集
print(s1.symmetric_difference(s2))
print(s1 ^ s2)  # ^ = 对称差集
